package Book;

public class Book {
    private String book_name;//书名
    private String publish;//出版社
    private String author;//作者
    private String kind;//种类
    private float price;//价格
    private boolean is_borrowed;//是否被借出

    public Book(String book_name, String publish, String author,
                String kind, float price, boolean is_borrowed) {
        this.book_name = book_name;
        this.publish = publish;
        this.author = author;
        this.kind = kind;
        this.price = price;
        this.is_borrowed = is_borrowed;
    }

    public String getBook_name() {
        return book_name;
    }

    public void setBook_name(String book_name) {
        this.book_name = book_name;
    }

    public String getPublish() {
        return publish;
    }

    public void setPublish(String publish) {
        this.publish = publish;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public boolean isIs_borrowed() {
        return is_borrowed;
    }

    public void setIs_borrowed(boolean is_borrowed) {
        this.is_borrowed = is_borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "book_name='" + book_name + '\'' +
                ", publish='" + publish + '\'' +
                ", author='" + author + '\'' +
                ", kind='" + kind + '\'' +
                ", price=" + price +
                ", is_borrowed=" +((is_borrowed==true)?"此书已经借出":"此书木有借出") +
                '}';
    }
}
